package mainpackage;

import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferStrategy;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

/**
 * Created by IntelliJ IDEA.
 * User: root
 * Date: 03.03.2010
 * Time: 20:09:19
 * To change this template use File | Settings | File Templates.
 */
public class InfoPanel extends JPanel {

    Graphics g2d;
    String[][] infoArray;
    int rowSize, verticalSize;
    Timer timer;
    BufferStrategy bs;

    public InfoPanel(String[][] infoArray, int rowSize, int verticalSize) {
        this.infoArray = infoArray;
        this.rowSize = rowSize;
        setIgnoreRepaint(true);
        timer = new Timer(0, new ActionListener(){
            public void actionPerformed(ActionEvent e){
                //repaint();
            }
        });
        timer.start();
        
    }

    @Override
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.drawString("adasd00", 100, 100);
        setIgnoreRepaint(true);
        //repaint();
    }

    public void addItem() {
        for (int i = 0; i < rowSize; i++) {
            //g2d.drawString(infoArray[i][0] + "-->" + infoArray[i][1], 10, verticalSize / rowSize * i);
            //repaint();
        }
    }
}
